package cate.common.table.activity.tangyuan;

import cate.common.table.ESheet;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

public class TangYuanPoolSheet extends ESheet<TangYuanPoolRow> {
    @Override
    public String getSheetName() {
        return "召唤组";
    }

    public List<TangYuanPoolRow> choosePool(int poolId) {
        if (CollectionUtils.isEmpty(list)) {
            return null;
        }
        List<TangYuanPoolRow> pool = new ArrayList<>();
        pool = list.stream().filter(row -> row.poolId == poolId).collect(Collectors.toList());
        return pool;
    }
}
